home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group96b.txt
/
000012_icon-group-sender _Sun Oct 6 20:16:45 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1997-01-02
|
2KB
Received: by cheltenham.cs.arizona.edu; Mon, 7 Oct 1996 10:15:52 MST
To: icon-group@cs.arizona.edu
Date: Sun, 6 Oct 1996 20:16:45 GMT
From: bezeau@jupiter.sun.csd.unb.ca (Larry Bezeau)
Message-Id: <bezeau.59.844633005@jupiter.csd.unb.ca>
Organization: New Brunswick Centre for Educational Administration
Sender: icon-group-request@cs.arizona.edu
Subject: Parsing the Icon command line
Errors-To: icon-group-errors@cs.arizona.edu
I have been using the Icon language extensively in recent
months and have found it to be a significant improvement over
Snobol4 which I had used previously for several decades. But there
is one apparent anomaly that confuses me, and that is how Icon
parses the command line. The problem arose in a program that
functions somewhat like the DOS find command but the simple three-
liner below illustrates it quite readily.
If the unescaped quotes on the command line are not really
quotes, then where did they go? What happend to the three spaces
on the command line between "C" and "D"? I was unable to come up
with a string on the command line that would be written out as
follows: *cd \
h:\>type c:\libicon\cmdline.icn
procedure main(C)
every write(&output,C[1 to *C])
end
h:\>cmdline.exe "A B" \"C D\"
A
B
C D
I am doing all this in a DOS window in OS/2 2.1 with the 4DOS command
processor. Note that 4DOS does not strip double quotation marks from
the command line.
Larry Bezeau@UNB.Ca